/**
 * Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 *
 * For the applicable distribution terms see the license.txt -file, included in
 * the distribution.
 */

#ifndef MYQMLAPPLICATIONVIEWER_H
#define MYQMLAPPLICATIONVIEWER_H

#include "qmlapplicationviewer.h"

#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
    #include <QSystemDeviceInfo>
    #include "rotationdata.h"

    QTM_USE_NAMESPACE; // Namespace declaration for Qt Mobility.
#endif

// Forward declarations
class AudioPlayer;
class ScreenSizeProvider;

class DeclarativePurchaseListModel;
class ProductCatalogModel;
class ResourceDataProvider;

class MyQmlApplicationViewer : public QmlApplicationViewer
{
    Q_OBJECT

public:
    explicit MyQmlApplicationViewer(QWidget *parent = 0);
    void showExpanded();
    void connectSignals();
    void launchWithSplashScreen();

public slots:
    void enableSplitSreen();

private slots:
    void loadGame();
    void showMainScreen();

#ifdef INAPP_BILLING
private slots:
    void iapLoadInterface();
    void appPurchaseCompleted(QVariant isUnlocked);
#endif //INAPP_BILLING

private: // Data
    AudioPlayer *m_audioPlayer;
    ScreenSizeProvider *m_screenSizeProvider;

#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
    RotationData *m_rotationData;
    QSystemDeviceInfo *m_deviceInfo;
#endif

#ifdef INAPP_BILLING
    ProductCatalogModel             *m_iapmodel;
    ResourceDataProvider            *m_featureProvider;
#endif //INAPP_BILLING
};

#endif // MYQMLAPPLICATIONVIEWER_H
